@layout("/common/_curd/_container.html"){

<script type="text/javascript">
	var ctx = "${basePath}";
	var grid_selector = "#grid-table";
	var pager_selector = "#grid-pager";
	
	$(function(){
		initGrid();
		initMenuBtn("btns", "${code}");
	});
	
	function initGrid(){
		var grid_url = ctx + "/${code}/list";
		var _colnames = ["记录编号", 
						"设备编号", 
						"数据地址", 
						"记录数值", 
						"记录日期", 
						"记录时间", 
						"参数ID"];
		var _colmodel = [{name:"log_id", index:"log_id", width:100,hidden:true},
						{name:"dev_id", index:"dev_id", width:100},
						{name:"data_addr", index:"data_addr", width:100},
						{name:"data_val", index:"data_val", width:100},
						{name:"log_date", index:"log_date", width:100},
						{name:"log_time", index:"log_time", width:100},
						{name:"param_id", index:"param_id", width:100}];
		
		jQuery(grid_selector).jqGrid({
			url : grid_url,
		    shrinkToFit : true,
			colNames : _colnames,
			colModel : _colmodel, 
			jsonReader : {id :"log_id"},
			pager : pager_selector,
			postData : {sort : "log_id", order : "desc"}
		});
	}
</script>


	<!-- 配置 grid -->
	<div class="row">
		<div class="col-xs-12 tb-grid">
			<!-- 配置 查询 -->
			@ var _col=[
@		{name:"记录编号", index:"log_id", type:"text"},
			@		{name:"设备编号", index:"dev_id", type:"text"},
			@		{name:"数据地址", index:"data_addr", type:"text"},
			@		{name:"记录数值", index:"data_val", type:"text"},
			@		{name:"记录日期", index:"log_date", type:"date"},
			@		{name:"记录时间", index:"log_time", type:"text"},
			@		{name:"参数ID", index:"param_id", type:"text"}							
			@];
			@ include("/common/_function/_search.html",{"col":_col}){}
			<!-- 按钮 -->
			<div class="welljq well-sm" id="btns"></div>
			<!-- grid -->
			<table id="grid-table"></table>
			<!-- 分页-->
			<div id="grid-pager"></div>
		</div>
	</div>
	
	<!-- 引入所需的js -->
	@include("/common/_listscript.html"){}
	
@}	
